<?php
include("auth.php");
$auth = new Auth();
$auth->table = "tbl_member";
// 注册
if ($_GET['action'] == "register"){
	$info = array(
	"username" => "abc",
	"password" => "123456"
	);

	if ($auth->dofun("register", array($info))) {
		echo $auth->msg;
	} else {
		echo $auth->msg;
	}
	// 登陆
} elseif ($_GET['action'] == "login") {
	$user = $auth->dofun("login", array("dong", "123456"));
	if ($user) {
		echo $auth->msg;
	} else {
		echo $auth->msg;
	}

	// 退出
} elseif ($_GET['action'] == "logout") {

	$auth->logout();

} elseif ($_GET['action'] == "islogin") {

	var_dump($auth->isLogin());

}


?>